
<html> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    <title>Read Result</title> 
    <link rel="stylesheet" type="text/css" href="/statics/css/nav.css" />
    <link rel="stylesheet" type="text/css" href="/statics/css/slider.css" />
    <link rel="stylesheet" type="text/css" href="/statics/css/style.css">
    <link rel="stylesheet" type="text/css" href="/css/style1.css"/>
    <script src="statics/js/jquery.min.js"></script>
</head> 
<body> 
    <!-- 头部 -->
    <?php
            include("../template/head.php");
        ?>
    <!-- 头部 -->
        
    <!--导航-->
        <?php
            include("../template/nav.php");
        ?>
    <!--导航-->
    <table width="60%" align="center" style="margin: 0 auto;"> 
    <tr>
        <td>

        </td>
    </tr>
    <?php 
        include("function.php");
        $data=get($_GET['file_name']);
        $page_count=count($data)-1;
        echo '
        <tr align="center">
            <td>
                第'.$data[$_GET['page']]['num'].'章 '.$data[$_GET['page']]['title'].'
            </td>
        </tr>
        <tr>
            <td>
                '.str_replace("\r\n","<br>",$data[$_GET['page']]['content']).'
            </td>
        </tr>
        ';

    ?> 
    </table> 
  
    <table width="60%"  bgcolor="#cccccc" align="center" style="margin: 0 auto;"> 
    <tr> 
    <td width="42%" align="center" valign="middle"><span class="STYLE1"> </span></td> 
    <td width="58%" height="28" align="left" valign="middle">
    <span class="STYLE1">
    <?php
    ini_set("error_reporting","E_ALL & ~E_NOTICE");
    echo '<a href="list.php?file_name='.$_GET['file_name'].'">目录</a> ';
        if($page!=1){ 
            echo '<a href="m.php?file_name='.$_GET['file_name'].'&page='.($_GET['page']-1).'"">上一章</a>'; 
        } 
        if($page<$page_count){ 
            echo '<a href="m.php?file_name='.$_GET['file_name'].'&page='.($_GET['page']+1).'"">下一章</a> '; 
        }
    ?> 
    </span> </td> 
    </tr> 
    </table> 
    <!-- 脚部 -->
    <?php
            include("../template/foot.php");
        ?>
    <!-- 脚部 -->
</body> 
</html>